package org.rc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

@Data
public class UserRole {

    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    private Long userId;

    private Long roleId;

    public static UserRole getInstance(Long userId, Long roleId){
        UserRole userRole = new UserRole();
        userRole.setUserId(userId);
        userRole.setRoleId(roleId);
        return userRole;
    }

}
